<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <canvas id="canvas" width="400" height="400"></canvas>
  <script>
    const ctx = document.getElementById('canvas');
    const gl = ctx.getContext('webgl')
    gl.clearColor(1.0,0.0,0.0,1.0) // 指定清空画布的颜色(r,g,b,a) 取值范围：0.0-1.0
    gl.clear(gl.COLOR_BUFFER_BIT) // 清空颜色缓冲区
  </script>
</body>
</html>